package opencl.utils;

import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;

public final class KernelUtils {

    private static final String KERNEL_FILE_EXTENSION = ".cl";
    private static final String KERNEL_FILES_DIR = "gdts-slave-repo/tasks/";

    public static String readKernelFrom(String kernelData) throws IOException {
        File kernelFile = new File(KERNEL_FILES_DIR + kernelData + KERNEL_FILE_EXTENSION);

        return FileUtils.readFileToString(kernelFile);
    }
}